<template>
  <div>
		<ol type="1">
			<Item
				v-for="(item, index) in tableData.records"
				:key="index"
				:item="item"></Item>
		</ol>
		<n-pagination
			v-model:page="params.pageNo"
			:page-count="tableData.totalPage"
			@update:page="getTable"/>
	</div>
</template>

<script setup lang="jsx">
import { reactive, ref } from 'vue'
import api from '@/data/question'
import Item from '../components/item'

const params = reactive({
	pageNo: 1,
	pageSize: 10
})
const tableData = ref(await api.getTableData(params))
function getTable () {
	api.upDateTable(params, tableData)
}
console.dir(tableData)
</script>

<style scoped lang="scss">
.n-pagination {
	margin-top: 20px;
}
</style>